import factory from '@adonisjs/lucid/factories'
import User from '#models/user'

export const UserFactory = factory
  .define(User, async ({ faker }) => {
    return {
      fkShopId: faker.number.int({ min: 1, max: 9 }),
      userName: faker.word.sample({ length: { min: 6, max: 15 } }),
      avatarUrl: faker.image.avatar(),
      nickName: faker.internet.userName(),
      phone: faker.phone.number('###########'),
      email: faker.internet.email(),
      sex: faker.number.int({ min: 0, max: 2 }),
      status: faker.number.int({ min: 0, max: 1 }),
      memo: faker.word.sample(),
      password: faker.internet.password({ length: 6 }),
    }
  })
  .build()
